<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp" %>

<!DOCTYPE html>
<html>
<head>
	<title>药品报价</title>
	<%@ include file="/WEB-INF/component/commonCSS.jsp" %>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1>药品报价解密详情</h1>
        <ol class="breadcrumb">
        	<li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="#">招标采购管理</a></li>
            <li class="active"><a href="#">报价管理</a></li>
            <li class="active"><a href="#">药品报价解密</a></li>
             <li class="active"><a href="#">药品报价解密详情</a></li>
        </ol>
    </section>
    
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <div class="form-inline">
                    <div class="form-group form-group-xs">
                        <label for="txtDrugForm">通用名：</label>
                        <input id="qualityspecName" class="form-control" type="text" placeholder="通用名" />
                    </div>
                    
                    <div class="form-group form-group-xs">
                        <label for="txtDrugForm">药品编码：</label>
                        <input id="qualityspecCode" class="form-control" type="text" placeholder="药品编码" />
                    </div>
                   <button type="button" class="btn btn-success btn-sm" onclick="search();">查     询 </button>
                </div>
            </div>
        </div>
            
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
        <div class=" box box-warning bottongroup">
        	<a href="${ctx}/drugPriceQuote/toDrugPriceDecryptProjList.html" class="btn btn-default btn-sm">返 回</a>
        </div>

    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp" %>
    <script type="text/javascript">
		function search() {
			var qualityspecCode = $.trim($("#qualityspecCode").val());
			var qualityspecName = $.trim($("#qualityspecName").val());
			$("#gridlist").jqGrid('setGridParam',{  
		        postData:{"qualityspecCode":qualityspecCode, "qualityspecName":qualityspecName}
		    }).trigger("reloadGrid"); //重新载入  
		}
		
		$(function () {
            $("#gridlist").jqGrid({
                url: "getDrugPriceDecryptDetailList.html",
                mtype: "POST",
                postData:{"projId":"${projId}"},
                datatype: "json",
                autowidth: true,
                height: 270,
                colNames: ['','药品编码', '通用名',  '剂型', '规格', '转换系数', '单位', '材质','状态','解密报价','解密时间'],
                colModel: [
					{ name: 'projId', width: 100,align: 'center',hidden:true},
					{ name: 'qualityspecCode', width: 100,align: 'center', sortable:false},
                    { name: 'qualityspecName', width: 140,align: 'left', sortable:false },
                    { name: 'formName', width: 80 ,align: 'center', sortable:false },
                    { name: 'specName', width: 80 ,align: 'left', sortable:false },
                    { name: 'factor', width: 80,align: 'center', sortable:false },
                    { name: 'packunitName', width: 40 ,align: 'center', sortable:false },
					{ name: 'materialName', width: 80 ,align: 'center', sortable:false },
					{ name: 'decryptStatus', width: 80 ,align: 'center', sortable:false,
						formatter : function(val, opts, rowdata) {
							if(rowdata.decryptStatus=="0"){
								return "未申报";
							}else if(rowdata.decryptStatus=="1"){
								return "未解密";
							}else if(rowdata.decryptStatus=="2"){
								return "已解密";
							}else{
								return "";
							}
                    		
                    	}
					},
                    { name: 'decryptPrice', width: 60, align: "right", sortable:false },
                    { name: 'decryptDatetime', width: 80, align: "center", sortable:false }
                ],
                rowNum: 20,
                rowList: [10, 20, 50, 100],
                rownumbers: true,
                pager: "#gridpage",
                viewrecords: true,
                caption: '${projName}'||'药品报价解密详情',
                jsonReader: {
                    repeatitems: false,
                    id: "projProddrugId"
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");
        });

    </script>
</body>
</html>